﻿using Panuon.WPF.UI;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;

namespace NaireSystem
{
    public class PageInfo
    {
        public PageInfo(int index, int size)
        {
            PageIndex = index;
            PageSize = size;
            if (PageIndex <= 0)
                PageIndex = 1;
            if (PageSize <= 0)
                PageSize = 10;
        }
        public PageInfo()
        {
            PageIndex = 1;
            PageSize = 10;
        }
        public int PageSize { get; set; } = 10;
        public int PageCount()
        {
            return (DataCount + PageSize - 1) / PageSize;
        }
        public int PageIndex { get; set; } = 1;
        public int DataCount { get; set; }
    }
}
